function search() {
  let input = document.getElementById("myInput");
  let filter = input.value.toUpperCase();
  let table = document.getElementById("myTable");
  let tr = table.querySelectorAll("tr");
  // 循环表格每一行，查找匹配项
  for (let i = 0; i < tr.length; i++) {
    let td = tr[i].querySelectorAll("td")[0]; //获得第一列（公司名称）
    if (td) {
      if (td.innerHTML.toUpperCase().indexOf(filter) > -1) {
        tr[i].style.display = "";
      } else {
        tr[i].style.display = "none";
      }
    }
  }
}
let input = document.getElementById("myInput");
input.addEventListener("input", search);
